package net.xdclass.sqlsessionfactory;

import java.sql.Connection;

/**
 * @Classname TestConnection
 * @Description TODO
 * @Date 2022/11/25 22:29
 * @Created by sunhao
 */
public class TestConnection {

  public static void main(String[] args) {
    for (int i = 1; i <= 3; i++) {
       new Thread(()->{
         for (int j = 0; j < 10; j++) {
           Connection connection = ConnectionPoolManager.getConnectionPool();
           System.out.println(Thread.currentThread().getName() + "," + connection);
           ConnectionPoolManager.closeConnection(connection);
         }
       }).start();
    }
  }
}

